@extends('backend::modal')
@section('title',trans($page_title))
@section('content')
    @if(isset($search_tpl))
        {{$search_tpl->render()}}
    @endif
    @component('backend::component.table.table-content')
        @slot('page_title') {{$page_title}} @endslot
        @slot('body_content')
            @if($list->isNotEmpty())
                <table class="table table-bordered table-striped">
                    <thead>
                    <tr>
                        <th>统计时间</th> <th>收入</th><th>支出</th><th>沉淀</th><th>拨比</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($list as $value)
                        <tr>
                            <td>{{$value->date}}</td>
                            <td>{{$value->income ?? 0}}</td>
                            <td>{{$value->expend ?? 0}}</td>
                            <td>{{$value->surplus ?? 0}}</td>
                            <td>{{$value->out_rate ?? 0}}%</td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
                @slot('list_page')
                    {{$list->appends([$search_tpl->getSearchData(),'type'=>$type])->links('backend::public.pagination')}}
                @endslot
            @else
                @component('backend::public.empty_page')
                    @slot('info') 暂时没有信息 @endslot
                @endcomponent
            @endif
        @endslot
    @endcomponent
@endsection